package cn.chencaiju.day11;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.chencaiju.day09.MyLineChart;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class LineChartApp extends Application {

	@Override
	public void start(Stage primaryStage) throws Exception {
		Map<String,Map<String,Integer>> map=new HashMap<>();
		map=DataLoad.bufferedReader(DataLoad.url, "gbk");
		
		VBox box = new VBox();
		List<LineChart<String, Number>> elements=MyLineChart.createLineChart(map);
		box.getChildren().addAll(elements);
		Scene scene=new Scene(box);
		
		primaryStage.setScene(scene);
		primaryStage.show();		
	}
	public static void main(String[] args) {
		launch(args);
	}

}
